export const swipeCellBehavior = Behavior({
  data: {
    SwipeCellQueue: []
  },

  methods: {
    // 获取滑块实例
    onSwipeCellOpen(e) {
      // console.log(e)
      const instance = this.selectComponent(`#${e.target.id}`)
      // console.log(instance)
      this.data.SwipeCellQueue.push(instance)
    },
    // 关掉滑块统一逻辑
    onSwipeCellCommonClick() {
      this.data.SwipeCellQueue.forEach((instance) => {
        instance.close()
      })
      this.data.swipeCelQueue = []
    },

    onSwipeCellpage() {
      this.onSwipeCellCommonClick()
    },

    onSwipeCellClick() {
      this.onSwipeCellCommonClick()
    }
  }
})
